import request from '@/plugin/axios'
export function GetRoleListAll (query) {
  return request({
    url:
      'api/services/app/Role/GetAll?SkipCount=' +
      query.skipCount +
      '&MaxResultCount=' +
      query.maxResultCount + '&Keyword=' + query.keyword,
    method: 'get'
  })
}
export function InsertRoleMunuAndButton (query) {
  return request({
    url: 'api/services/app/Menu/InsertRoleMunuAndButton',
    method: 'post',
    data: query
  })
}

export function GetRoleMenuAll (query) {
  return request({
    url: 'api/services/app/Menu/GetMenuListAllByRoleId?Id=' + query,
    method: 'get'
  })
}

export function GetAllPermissions () {
  return request({
    url: 'api/services/app/Role/GetAllPermissions',
    method: 'get'
  })
}

export function Create (query) {
  return request({
    url: 'api/services/app/Role/Create',
    method: 'post',
    data: query
  })
}

export function Update (query) {
  return request({
    url: 'api/services/app/Role/Update',
    method: 'put',
    data: query
  })
}

export function Delete (query) {
  return request({
    url: 'api/services/app/Role/Delete?Id=' + query,
    method: 'delete'
  })
}
